﻿@{
    Layout = null;
}
@using ZBJF.Warranty.Common.Common
@model List<ZBJF.Warranty.Model.SellersOrganization>
    @foreach (var item in Model.Where(m => m.ParentOrganizationId == ViewBag.Pid))
    {
        int layer = ViewBag.Layer;
        <option value="@item.ID">@Html.Raw(CommonMethod.GetHtmlBlankSpace(layer)) @item.OrganizationName</option>
        var childMenu = Model.Where(m => m.ParentOrganizationId == item.ID);
        layer = layer + 1;
        if (layer <2)
        {
            if (childMenu.Any())
            {
                @Html.Action("ShowMenuSelectList", "SellersOrganization", new { listPage = Model, pid = item.ID, layer = layer })
            }
        }
        layer = layer - 1;
    }
